home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Help / locale / help / english / sys / prompt.doc < prev    next >
Encoding:
Text File  |  2000-10-06  |  1.4 KB  |  68 lines

  1. PROMPT
  2.  
  3. Changes the prompt string of the current Shell.
  4.  
  5. Format
  6.  
  7. PROMPT [<prompt>]
  8.  
  9. Template
  10.  
  11. PROMPT
  12.  
  13. Location
  14.  
  15. Internal
  16.  
  17. PROMPT allows you to customize the prompt string, the text printed by the
  18. Shell at the beginning of a command line. The prompt string can contain any
  19. characters, including escape sequences.
  20.  
  21. This manual shows the prompt string as 1>.
  22.  
  23. The default prompt string is:
  24.  
  25. "%N.%S>"
  26.  
  27. which displays the Shell number, a period, the current directory, a right
  28. angle-bracket, and a space. Entering PROMPT without a string argument resets
  29. the prompt to this default.
  30.  
  31. The substitutions available for the <prompt> string are:
  32.  
  33. %N
  34.  
  35. Displays the process number for the Shell.
  36.  
  37. %S
  38.  
  39. Displays the current directory.
  40.  
  41. %R
  42.  
  43. Displays the return code for the last operation.
  44.  
  45. A space is not automatically added to the end of the string. If you want a
  46. space between the prompt and typed-in text, place it in the string, and
  47. enclose the string in double quotation marks,
  48.  
  49. You can embed commands in the prompt string by enclosing the command in back
  50. apostrophes (`).
  51.  
  52. Example 1:
  53.  
  54. 1> PROMPT %N
  55. 1
  56.  
  57. Only the Shell number is shown. The > is removed from the prompt.
  58.  
  59. Example 2:
  60.  
  61. 1> PROMPT "%N.%S.%R>"
  62. 1.Work:Snim.0>
  63.  
  64. The Shell number, current directory, and return code of the previous command
  65. are shown. A space is included after the >.
  66.  
  67. For more examples using the PROMPT command, see Chapter 8.
  68.